1. Field of the Invention
The present invention relates to the field of computer systems. More specifically, the present invention relates to the determination of memory types on a computer system having multiple types of memory.
2. Background
"Memory typing" is known in the art, however it is limited in scope. Typically, a memory page is only "typed" as cacheable or non-cacheable. 0n some computer systems, a memory page is further "typed" as writethrough or writeback. Because of the limited scope of "typing", no formally defined memory types are really assigned or stored for the memory pages. Instead the limited number of "typing attributes" are set and stored for the memory pages. The "typing attributes" are determined and set by the memory subsystem late in the execution stage, using memory address decoding hardware external to the processor. These external memory address decoding hardware are usaully mapping or comparator based, varying in functions, complexity, and cost.
The prior art approach of having the memory subsystem determine and set the "typing attributes" has at least three disadvantages. First of all, it does not readily lend itself to supporting the implementation of write allocate by read for ownership for write cache misses. The simpler form of write allocate with invalidate is usually employed instead. Secondly, it also does not readily lend itself to supporting the implementation of speculative loads for out-of-order executions, particularly when the I/0 devices can be mapped to memory. Thirdly, it does not readily lend itself to supporting the implementation of new memory types, such as write combined memory for frame buffers. While the first two disadvantages may be solved with a more sophisticated bus protocol, the third disadvantage cannot be easily overcome with a bus protocol based solution. Thus, it is desirable to be able to determine memory type in an earlier manner that overcomes these disadvantages.
Additionally, since memory type determination is often a critical performance path for existing computer systems, it is further desirable if the earlier manner of memory type determination can embrace the best characteristics of the various mapping and comparator based external memory address decoding hardware in terms of richness in functions, yet remain simplistic in implementation and low in cost. Furthermore, the earlier manner of determination is upward compatible for applications developed under the traditional late manner of determination.
As will be disclosed, the method and apparatus of the present invention determines memory type early in the execution stage, and advantageously achieves the above described desirable results.